home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
vbasic
/
receipt.exe
/
GRID1DLG.FRM
< prev
next >
Wrap
Text File
|
1993-07-22
|
18KB
|
573 lines
VERSION 2.00
Begin Form Form3
Caption = "Item 1"
ClientHeight = 4665
ClientLeft = 750
ClientTop = 1845
ClientWidth = 8310
Height = 5070
Left = 690
LinkMode = 1 'Source
LinkTopic = "Form3"
ScaleHeight = 311
ScaleMode = 3 'Pixel
ScaleWidth = 554
Top = 1500
Width = 8430
Begin CommandButton Command1
Caption = "Done"
Height = 375
Index = 3
Left = 6240
TabIndex = 8
Top = 3960
Width = 1455
End
Begin CommandButton Command1
Caption = "Clear"
Height = 375
Index = 2
Left = 4440
TabIndex = 7
Top = 3960
Width = 1455
End
Begin CommandButton Command1
Caption = "Previous Item"
Height = 375
Index = 1
Left = 2640
TabIndex = 6
Top = 3960
Width = 1455
End
Begin CommandButton Command1
Caption = "Next Item"
Height = 375
Index = 0
Left = 720
TabIndex = 5
Top = 3960
Width = 1575
End
Begin VBedit BEdit5
CellHeight = 32
CellWidth = 22
CharSet = 16420
CombBaseLine = 24.333
CombEndHeight = 8
CombEndMarker = 0 'False
CombHeight = 4
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 18
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
InflateBottom = 12
InflateLeft = 12
InflateRight = 12
InflateTop = 16
Left = 5160
TabIndex = 12
Text = " 0.00"
Top = 3120
Version = 268435458
Width = 2415
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 11
Left = 2085
Picture = GRID1DLG.FRX:0000
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 29
Top = 2910
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 10
Left = 1590
Picture = GRID1DLG.FRX:0302
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 28
Top = 2910
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 9
Left = 1095
Picture = GRID1DLG.FRX:0604
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 27
Top = 2910
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 8
Left = 600
Picture = GRID1DLG.FRX:0906
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 26
Top = 2910
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 7
Left = 105
Picture = GRID1DLG.FRX:0C08
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 25
Top = 2910
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture1
AutoSize = -1 'True
Height = 510
Left = 7080
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 16
Top = 1920
Width = 510
End
Begin VBedit BEdit4
CellHeight = 32
CellWidth = 22
CombBaseLine = 24.333
CombEndHeight = 8
CombEndMarker = 0 'False
CombHeight = 4
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 18
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1095
InflateBottom = 12
InflateLeft = 12
InflateRight = 12
InflateTop = 16
Left = 1440
TabIndex = 9
Top = 1680
Version = 268435458
Width = 5415
End
Begin VBedit BEdit3
CellHeight = 32
CellWidth = 22
CharSet = 16388
CombBaseLine = 28
CombEndHeight = 8
CombEndMarker = 0 'False
CombHeight = 4
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 18
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
InflateBottom = 12
InflateLeft = 12
InflateRight = 12
InflateTop = 16
Left = 6255
TabIndex = 15
Top = 840
Version = 268435458
Width = 1335
End
Begin VBedit BEdit2
CellHeight = 32
CellWidth = 22
CharSet = 16651
CombBaseLine = 24.333
CombEndHeight = 8
CombEndMarker = 0 'False
CombHeight = 4
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 18
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
InflateBottom = 12
InflateLeft = 12
InflateRight = 12
InflateTop = 16
Left = 3480
TabIndex = 11
Top = 840
Version = 268435458
Width = 1095
End
Begin VBedit BEdit1
CellHeight = 32
CellWidth = 22
CharSet = 16388
CombBaseLine = 24.333
CombEndHeight = 8
CombEndMarker = 0 'False
CombHeight = 4
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 18
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
InflateBottom = 12
InflateLeft = 12
InflateRight = 12
InflateTop = 16
Left = 1200
TabIndex = 10
Top = 840
Version = 268435458
Width = 1095
End
Begin ComboBox Combo1
Height = 300
Left = 960
TabIndex = 13
Top = 240
Width = 3015
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 6
Left = 7080
Picture = GRID1DLG.FRX:0F0A
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 21
Top = 120
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 5
Left = 6600
Picture = GRID1DLG.FRX:120C
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 20
Top = 120
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 4
Left = 6120
Picture = GRID1DLG.FRX:150E
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 22
Top = 120
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 3
Left = 5640
Picture = GRID1DLG.FRX:1810
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 17
Top = 120
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 2
Left = 5160
Picture = GRID1DLG.FRX:1B12
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 18
Top = 120
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 1
Left = 4680
Picture = GRID1DLG.FRX:1E14
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 19
Top = 120
Visible = 0 'False
Width = 510
End
Begin PictureBox Picture2
AutoSize = -1 'True
Height = 510
Index = 0
Left = 4200
Picture = GRID1DLG.FRX:2116
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 23
Top = 120
Visible = 0 'False
Width = 510
End
Begin Label Label7
Caption = "Price Each:"
Height = 255
Left = 3690
TabIndex = 4
Top = 3240
Width = 1095
End
Begin Label Label6
Caption = "$"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 18
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 4920
TabIndex = 24
Top = 3150
Width = 225
End
Begin Label Label5
Caption = "Description:"
Height = 255
Left = 120
TabIndex = 1
Top = 1800
Width = 1095
End
Begin Label Label3
Caption = "Item No."
Height = 255
Left = 5040
TabIndex = 14
Top = 960
Width = 735
End
Begin Label Label2
Caption = "Unit:"
Height = 255
Left = 2880
TabIndex = 3
Top = 960
Width = 375
End
Begin Label Label1
Caption = "Quantity:"
Height = 255
Left = 240
TabIndex = 2
Top = 960
Width = 735
End
Begin Label Label4
Caption = "Item:"
Height = 255
Left = 240
TabIndex = 0
Top = 240
Width = 495
End
End
Dim CurItem As Integer
Sub Combo1_Click ()
Picture1.Picture = Picture2(Combo1.ListIndex).Picture
BEdit2.Text = ItemInfo(Combo1.ListIndex).Unit
BEdit3.Text = LTrim$(Str$(Combo1.ListIndex))
BEdit4.Text = ItemInfo(Combo1.ListIndex).Info
BEdit5.Text = Format$(ItemInfo(Combo1.ListIndex).Price, "###0.00")
End Sub
Sub Command1_Click (Index As Integer)
Select Case Index
Case 0
Form2.Grid1.Row = CurItem ' Save current entry
Form2.Grid1.Col = 0
Form2.Grid1.Text = BEdit1.Text
Form2.Grid1.Col = 1
Form2.Grid1.Text = BEdit2.Text
Form2.Grid1.Col = 2
Form2.Grid1.Text = BEdit3.Text
Form2.Grid1.Col = 3
Form2.Grid1.Text = BEdit4.Text
Form2.Grid1.Col = 4
Form2.Grid1.Text = BEdit5.Text
CompressItems
If CurItem < MAXITEMS Then ' At bottom of list
CurItem = CurItem + 1 ' create new entry
NumItems = NumItems + 1
Form3.Caption = "Item" + Str$(CurItem)
Else
MsgBox "No Available Entry Space"
End If
Form2.Grid1.Row = CurItem 'Highlight current entry
Form2.Grid1.SelStartCol = 0
Form2.Grid1.SelEndCol = 5
Form2.Grid1.SelStartRow = CurItem
Form2.Grid1.SelEndRow = CurItem
Form2.Grid1.Col = 0
BEdit1.Text = Form2.Grid1.Text
Form2.Grid1.Col = 1
BEdit2.Text = Form2.Grid1.Text
Form2.Grid1.Col = 2
BEdit3.Text = Form2.Grid1.Text
Form2.Grid1.Col = 3
BEdit4.Text = Form2.Grid1.Text
Form2.Grid1.Col = 4
BEdit5.Text = Form2.Grid1.Text
Combo1.Text = ""
Picture1.Picture = LoadPicture("")
Case 1
Form2.Grid1.Row = CurItem ' Save current entry
Form2.Grid1.Col = 0
Form2.Grid1.Text = BEdit1.Text
Form2.Grid1.Col = 1
Form2.Grid1.Text = BEdit2.Text
Form2.Grid1.Col = 2
Form2.Grid1.Text = BEdit3.Text
Form2.Grid1.Col = 3
Form2.Grid1.Text = BEdit4.Text
Form2.Grid1.Col = 4
Form2.Grid1.Text = BEdit5.Text
CompressItems
If CurItem > 1 Then
CurItem = CurItem - 1
Form3.Caption = "Item" + Str$(CurItem)
Else
MsgBox "At top of List"
End If
Form2.Grid1.Row = CurItem
Form2.Grid1.SelStartCol = 0
Form2.Grid1.SelEndCol = 5
Form2.Grid1.SelStartRow = CurItem
Form2.Grid1.SelEndRow = CurItem
Form2.Grid1.Col = 0
BEdit1.Text = Form2.Grid1.Text
Form2.Grid1.Col = 1
BEdit2.Text = Form2.Grid1.Text
Form2.Grid1.Col = 2
BEdit3.Text = Form2.Grid1.Text
Form2.Grid1.Col = 3
BEdit4.Text = Form2.Grid1.Text
Form2.Grid1.Col = 4
BEdit5.Text = Form2.Grid1.Text
Combo1.Text = ""
Picture1.Picture = LoadPicture("")
Case 2
Combo1.Text = ""
Picture1.Picture = LoadPicture()
BEdit1.Text = ""
BEdit2.Text = ""
BEdit3.Text = ""
BEdit4.Text = ""
BEdit5.Text = ""
Case 3
Form2.Grid1.Col = 0
Form2.Grid1.Text = BEdit1.Text
Form2.Grid1.Col = 1
Form2.Grid1.Text = BEdit2.Text
Form2.Grid1.Col = 2
Form2.Grid1.Text = BEdit3.Text
Form2.Grid1.Col = 3
Form2.Grid1.Text = BEdit4.Text
Form2.Grid1.Col = 4
Form2.Grid1.Text = BEdit5.Text
CalcTotals
Unload Form3
End Select
End Sub
Sub Form_Load ()
Form3.Top = (Screen.Height - Form3.Height) / 2
Form3.Left = (Screen.Width - Form3.Width) / 2
Combo1.AddItem "1 Candy Bar"
Combo1.AddItem "2 Cheeseburger"
Combo1.AddItem "3 Chips"
Combo1.AddItem "4 French Fries (small)"
Combo1.AddItem "5 French Fries (large)"
Combo1.AddItem "6 Hamburger"
Combo1.AddItem "7 Visual Basic 1.0"
Combo1.AddItem "8 Windows 3.1"
Combo1.AddItem "9 Pizza"
Combo1.AddItem "10 Soda Pop (small)"
Combo1.AddItem "11 Soda Pop (large)"
Combo1.AddItem "12 6' Sub Sandwich"
If Form2.Grid1.Row > NumItems Then
NumItems = NumItems + 1 ' Entering new item
Form2.Grid1.Row = NumItems
End If
CurItem = Form2.Grid1.Row
Form2.Grid1.Row = CurItem
Form2.Grid1.SelStartCol = 0
Form2.Grid1.SelEndCol = 5
Form2.Grid1.SelStartRow = CurItem
Form2.Grid1.SelEndRow = CurItem
Form2.Grid1.Col = 0
BEdit1.Text = LTrim$(Form2.Grid1.Text)
Form2.Grid1.Col = 1
BEdit2.Text = LTrim$(Form2.Grid1.Text)
Form2.Grid1.Col = 2
BEdit3.Text = LTrim$(Form2.Grid1.Text)
Form2.Grid1.Col = 3
BEdit4.Text = LTrim$(Form2.Grid1.Text)
Form2.Grid1.Col = 4
BEdit5.Text = Format$(Val(Form2.Grid1.Text), "##0.00")
End Sub